<template>
  <el-table stripe :data="mentData" style="width: 100%" :header-cell-style="{ background: '#f2f2f2', color: '#333', fontWeight: 600, }">
    <el-table-column prop="equipmentId" label="设备ID" align="center"> 
      <template slot-scope="scope">{{ scope.row.equName == null ? '--' : scope.row.equName }}</template>
    </el-table-column>
    <el-table-column label="安装时间" align="center"> 
      <template slot-scope="scope">{{ scope.row.wareDate == null ? '--' : scope.row.wareDate }}</template>
    </el-table-column>
    <el-table-column label="内存（G）" align="center"> 
      <template slot-scope="scope">{{ scope.row.model == null ? '--' : scope.row.model }}</template>
    </el-table-column>
    <el-table-column label="状态" align="center"> 
      <template slot-scope="scope">{{ scope.row.equStauts == 1 ? '正常' : scope.row.equStauts == 2 ? '异常' : '' }}</template>
    </el-table-column>
    <el-table-column label="操作" align="center">
      <template slot-scope="scope">
        <el-button
          @click.native.prevent="deleteRow(scope.$index, scope.row)"
          type="text"
          size="small" > 卸载 </el-button>
      </template>
    </el-table-column>
  </el-table>
</template>

<script>
export default {
  props: {
    mentData: {
      type: Array,
      default: null
    }
  },
  methods: {
    deleteRow(index, rows) {
      this.$emit('deleteRow' , index, rows )
    }
  }
}
</script>

<style scoped>
.el-button.is-disabled{ color: #C0C4CC; }
.el-button--small{ font-size: 14px; }
.el-button--text{ color: #ff4949; }
</style>